﻿using com.iot.core.annotation;
using Microsoft.EntityFrameworkCore;
using System.ComponentModel.DataAnnotations;
using System.ComponentModel.DataAnnotations.Schema;
using System.Xml.Linq;

namespace com.iot.core.data.entity
{
    [Schema(Name = "功能授权表", Description = "")]     
    public class HtPageAuth : BaseEntity, ISoftDeletedEntity
    {




        [Comment("授权代码")]
        [Schema(Name = "授权代码", Description = "")]
        [MaxLength(50)]
        public string Code { get; set; } = "";


        [Comment("授权名称")]
        [Schema(Name = "授权名称", Description = "")]
        [Required(ErrorMessage = "{0}不能为空")]
        [MaxLength(50)]
        public string Name { get; set; } = "";


        [Comment("功能编号")]
        [Schema(Name = "功能编号", Description = "")]
        public long HtpageId { get; set; }


        [Comment("Action编号")]
        [Schema(Name = "Action编号", Description = "这个字段暂时不用，全部用Urls字段")]
        public long HtactionId { get; set; }


        [Comment("备注")]
        [Schema(Name = "备注", Description = "")]
        public string Memo { get; set; } = "";


        [Comment("Urls")]
        [Schema(Name = "Urls", Description = "支持*号，多个Url逗号分隔")]
        public string Urls { get; set; } = "";


        [Comment("参数1")]
        [Schema(Name = "参数1", Description = "网站Url")]
        [MaxLength(50)]
        public string P1 { get; set; } = "";


        [Comment("参数2")]
        [Schema(Name = "参数2", Description = "")]
        [MaxLength(50)]
        public string P2 { get; set; } = "";


        [Comment("参数3")]
        [Schema(Name = "参数3", Description = "")]
        [MaxLength(50)]
        public string P3 { get; set; } = "";


        [Comment("参数4")]
        [Schema(Name = "参数4", Description = "")]
        [MaxLength(50)]
        public string P4 { get; set; } = "";


        [Comment("排序号")]
        [Schema(Name = "排序号", Description = "")]
        public long Sortno { get; set; }


        [Comment("创建日期")]
        [Schema(Name = "创建日期", Description = "")]
        public DateTime CrtDt { get; set; }


        [Comment("创建人编号")]
        [Schema(Name = "创建人编号", Description = "")]
        public long CrtUid { get; set; }


        [Comment("机构编号")]
        [Schema(Name = "机构编号", Description = "")]
        public long CrtDid { get; set; }


        [Comment("修改日期")]
        [Schema(Name = "修改日期", Description = "")]
        public DateTime EdtDt { get; set; }


        [Comment("修改人编号")]
        [Schema(Name = "修改人编号", Description = "")]
        public long EdtUid { get; set; }


        [Comment("Gid")]
        [Schema(Name = "Gid", Description = "")]
        public Guid Gid { get; set; }


        [Comment("删除标志")]
        [Schema(Name = "删除标志", Description = "")]
        public bool Deleted { get; set; }
    }
}
